<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>input&amp;label基本使用 | H5学习笔记</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        <meta name="author" content="liujw">
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-sectionx/sectionx.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../html/form.html" />
    
    
    <link rel="prev" href="../html/base&amp;icon.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="1.13"
        data-chapter-title="input&amp;label基本使用"
        data-filepath="html/input&amp;label.md"
        data-basepath=".."
        data-revision="Mon Jan 08 2018 00:40:26 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="md/html.html">
            
                
                    <a href="../md/html.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        html
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="html/description.html">
            
                
                    <a href="../html/description.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        页面基本认识
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="md/ul/ul.html">
            
                
                    <a href="../md/ul/ul.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        ul标签使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="html/a.html">
            
                
                    <a href="../html/a.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        a标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="html/table.html">
            
                
                    <a href="../html/table.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        table标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="html/img.html">
            
                
                    <a href="../html/img.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        img标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="html/hotmap.html">
            
                
                    <a href="../html/hotmap.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        hotmap基本使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="html/audio&amp;video.html">
            
                
                    <a href="../html/audio&amp;video.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        audio和video标签基本使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="html/picture.html">
            
                
                    <a href="../html/picture.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.8.</b>
                        
                        响应式picture标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="html/dl.html">
            
                
                    <a href="../html/dl.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.9.</b>
                        
                        dl标签基本使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="html/ul&amp;ol.html">
            
                
                    <a href="../html/ul&amp;ol.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.10.</b>
                        
                        有序与无序列表
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="html/iframe.html">
            
                
                    <a href="../html/iframe.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.11.</b>
                        
                        内嵌框架
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="html/base&amp;icon.html">
            
                
                    <a href="../html/base&amp;icon.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.12.</b>
                        
                        base&amp;link基本使用
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="1.13" data-path="html/input&amp;label.html">
            
                
                    <a href="../html/input&amp;label.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.13.</b>
                        
                        input&amp;label基本使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="html/form.html">
            
                
                    <a href="../html/form.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.14.</b>
                        
                        from标签基本使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="html/input+.html">
            
                
                    <a href="../html/input+.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.15.</b>
                        
                        input拓展
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.16" data-path="html/select.html">
            
                
                    <a href="../html/select.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.16.</b>
                        
                        select&amp;optgroup标签
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="md/css.html">
            
                
                    <a href="../md/css.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        css
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="css/sass.html">
            
                
                    <a href="../css/sass.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        sass的安装与基本使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="gulp.html">
            
                
                    <a href="../gulp.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        gulp的使用与安装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="css/introduce.html">
            
                
                    <a href="../css/introduce.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        css引入方式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="md/css，selector.html">
            
                
                    <a href="../md/css，selector.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        选择器
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.4.1" data-path="css/selector/es.html">
            
                
                    <a href="../css/selector/es.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.1.</b>
                        
                        元素选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4.2" data-path="css/selector/relation.html">
            
                
                    <a href="../css/selector/relation.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.2.</b>
                        
                        关系选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4.3" data-path="css/selector/pc.html">
            
                
                    <a href="../css/selector/pc.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.3.</b>
                        
                        伪类选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4.4" data-path="css/selector/id&amp;class.html">
            
                
                    <a href="../css/selector/id&amp;class.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.4.</b>
                        
                        id和类选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4.5" data-path="css/selector/attribute.html">
            
                
                    <a href="../css/selector/attribute.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.5.</b>
                        
                        属性选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4.6" data-path="css/selector/pe.html">
            
                
                    <a href="../css/selector/pe.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.6.</b>
                        
                        伪像选择器
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="css/type/type.html">
            
                
                    <a href="../css/type/type.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        css样式
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.5.1" data-path="css/type/color.html">
            
                
                    <a href="../css/type/color.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.1.</b>
                        
                        颜色属性color
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5.2" data-path="css/type/font.html">
            
                
                    <a href="../css/type/font.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.2.</b>
                        
                        字体样式font
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5.3" data-path="css/type/text-decoration.html">
            
                
                    <a href="../css/type/text-decoration.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.3.</b>
                        
                        文本修饰
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5.4" data-path="css/type/text-shadow.html">
            
                
                    <a href="../css/type/text-shadow.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.4.</b>
                        
                        文字阴影
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5.5" data-path="css/type/iconfont.html">
            
                
                    <a href="../css/type/iconfont.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.5.</b>
                        
                        尺量图iconfont引用
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="css/layout/layout.html">
            
                
                    <a href="../css/layout/layout.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        css布局
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.6.1" data-path="css/layout/align.html">
            
                
                    <a href="../css/layout/align.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.1.</b>
                        
                        对齐方式align
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6.2" data-path="css/layout/box.html">
            
                
                    <a href="../css/layout/box.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.2.</b>
                        
                        盒子模型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6.3" data-path="css/layout/float.html">
            
                
                    <a href="../css/layout/float.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.3.</b>
                        
                        浮动
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6.4" data-path="css/layout/inline&amp;block.html">
            
                
                    <a href="../css/layout/inline&amp;block.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.4.</b>
                        
                        块级元素和行内元素
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6.5" data-path="css/layout/textprocessing.html">
            
                
                    <a href="../css/layout/textprocessing.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.5.</b>
                        
                        文字处理和图片处理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6.6" data-path="css/layout/position.html">
            
                
                    <a href="../css/layout/position.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.6.</b>
                        
                        定位属性position
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6.7" data-path="css/layout/flex.html">
            
                
                    <a href="../css/layout/flex.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.7.</b>
                        
                        弹性盒子布局flex
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >H5学习笔记</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="inputlabel&#x6807;&#x7B7E;">input&amp;label&#x6807;&#x7B7E;</h1>
<h3 id="&#x6807;&#x7B7E;&#x4ECB;&#x7ECD;">&#x6807;&#x7B7E;&#x4ECB;&#x7ECD;</h3>
<ol>
<li><p><code>&lt;input&gt;</code>&#x6807;&#x7B7E;&#x7528;&#x4E8E;&#x641C;&#x96C6;&#x7528;&#x6237;&#x4FE1;&#x606F;&#x3002;&#x6839;&#x636E;&#x4E0D;&#x540C;&#x7684; type &#x5C5E;&#x6027;&#x503C;&#xFF0C;&#x8F93;&#x5165;&#x5B57;&#x6BB5;&#x62E5;&#x6709;&#x5F88;&#x591A;&#x79CD;&#x5F62;&#x5F0F;&#x3002;&#x8F93;&#x5165;&#x5B57;&#x6BB5;&#x53EF;&#x4EE5;&#x662F;&#x6587;&#x672C;&#x5B57;&#x6BB5;&#x3001;&#x590D;&#x9009;&#x6846;&#x3001;&#x63A9;&#x7801;&#x540E;&#x7684;&#x6587;&#x672C;&#x63A7;&#x4EF6;&#x3001;&#x5355;&#x9009;&#x6309;&#x94AE;&#x3001;&#x6309;&#x94AE;&#x7B49;&#x7B49;&#x3002;<br><strong>name &#x867D;&#x7136;&#x540D;&#x5B57;&#x53EF;&#x4EE5;&#x4E0D;&#x4E00;&#x6837;&#xFF0C;&#x4F46;&#x56E0;&#x4E3A;&#x8868;&#x793A;&#x7684;&#x662F;&#x540C;&#x4E00;&#x4E2A;&#x6570;&#x636E;&#xFF0C;&#x6240;&#x4EE5;&#x5EFA;&#x8BAE;&#x8981;&#x7528;&#x76F8;&#x540C;&#x7684;&#x540D;&#x5B57;&#x5E76;&#x4E14;&#x662F;&#x4E00;&#x4E2A;&#x6570;&#x7EC4;&#xFF0C;&#x65B9;&#x4FBF;&#x540E;&#x53F0;&#x7BA1;&#x7406;&#x6570;&#x636E;</strong></p>
</li>
<li><p><code>&lt;label&gt;</code> &#x6807;&#x7B7E;&#x4E3A; input &#x5143;&#x7D20;&#x5B9A;&#x4E49;&#x6807;&#x6CE8;&#xFF08;&#x6807;&#x8BB0;&#xFF09;&#x3002;
label &#x5143;&#x7D20;&#x4E0D;&#x4F1A;&#x5411;&#x7528;&#x6237;&#x5448;&#x73B0;&#x4EFB;&#x4F55;&#x7279;&#x6B8A;&#x6548;&#x679C;&#x3002;&#x4E0D;&#x8FC7;&#xFF0C;&#x5B83;&#x4E3A;&#x9F20;&#x6807;&#x7528;&#x6237;&#x6539;&#x8FDB;&#x4E86;&#x53EF;&#x7528;&#x6027;&#x3002;&#x5982;&#x679C;&#x60A8;&#x5728; label &#x5143;&#x7D20;&#x5185;&#x70B9;&#x51FB;&#x6587;&#x672C;&#xFF0C;&#x5C31;&#x4F1A;&#x89E6;&#x53D1;&#x6B64;&#x63A7;&#x4EF6;&#x3002;&#x5C31;&#x662F;&#x8BF4;&#xFF0C;&#x5F53;&#x7528;&#x6237;&#x9009;&#x62E9;&#x8BE5;&#x6807;&#x7B7E;&#x65F6;&#xFF0C;&#x6D4F;&#x89C8;&#x5668;&#x5C31;&#x4F1A;&#x81EA;&#x52A8;&#x5C06;&#x7126;&#x70B9;&#x8F6C;&#x5230;&#x548C;&#x6807;&#x7B7E;&#x76F8;&#x5173;&#x7684;&#x8868;&#x5355;&#x63A7;&#x4EF6;&#x4E0A;&#x3002;</p>
</li>
<li><code>&lt;label&gt;</code> &#x6807;&#x7B7E;&#x7684; for &#x5C5E;&#x6027;&#x5E94;&#x5F53;&#x4E0E;&#x76F8;&#x5173;&#x5143;&#x7D20;&#x7684; id &#x5C5E;&#x6027;&#x76F8;&#x540C;&#x3002;
<strong>&quot;for&quot; &#x5C5E;&#x6027;&#x53EF;&#x628A; label &#x7ED1;&#x5B9A;&#x5230;&#x53E6;&#x5916;&#x4E00;&#x4E2A;&#x5143;&#x7D20;&#x3002;&#x8BF7;&#x628A; &quot;for&quot; &#x5C5E;&#x6027;&#x7684;&#x503C;&#x8BBE;&#x7F6E;&#x4E3A;&#x76F8;&#x5173;&#x5143;&#x7D20;&#x7684; id &#x5C5E;&#x6027;&#x7684;&#x503C;&#x3002;</strong><br><strong>&#x6CE8;&#x610F;&#x4E8B;&#x9879;&#xFF1A;&#x5982;&#x679C;&#x6D89;&#x53CA;&#x5230;&#x6587;&#x4EF6;&#x4E0A;&#x4F20;&#xFF0C;&#x9700;&#x8981;&#x7528;post&#x65B9;&#x5F0F;&#xFF0C;&#x5E76;&#x4E14;form&#x7684;enctype&#x5C5E;&#x6027;&#xFF0C;&#x9700;&#x8981;&#x8BBE;&#x7F6E;&#x4E3A;multipart/form-data</strong></li>
</ol>
<h3 id="&#x5C5E;&#x6027;">&#x5C5E;&#x6027;</h3>
<table>
<thead>
<tr>
<th>input&#x5C5E;&#x6027;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td>accept</td>
<td>&#x89C4;&#x5B9A;&#x901A;&#x8FC7;&#x6587;&#x4EF6;&#x4E0A;&#x4F20;&#x6765;&#x63D0;&#x4EA4;&#x7684;&#x6587;&#x4EF6;&#x7684;&#x7C7B;&#x578B;&#x3002;image/<em>&#x3001;video/</em>&#x3001;audio/*&#x3002;&#x591A;&#x79CD;&#x7C7B;&#x578B;&#x53EF;&#x4EE5;&#x7528;&#x9017;&#x53F7;&#x9694;&#x5F00;</td>
</tr>
<tr>
<td>alt</td>
<td>&#x5B9A;&#x4E49;&#x56FE;&#x50CF;&#x8F93;&#x5165;&#x7684;&#x66FF;&#x4EE3;&#x6587;&#x672C;&#x3002;</td>
</tr>
<tr>
<td>capture</td>
<td>&#x53EF;&#x4EE5;&#x8BBE;&#x7F6E;&#x6253;&#x5F00;&#x7A0B;&#x5E8F;&#xFF08;&#x9488;&#x5BF9;&#x79FB;&#x52A8;&#x7AEF;&#xFF09; camera camcorder microphone</td>
</tr>
<tr>
<td>checked</td>
<td>&#x89C4;&#x5B9A;&#x6B64; input &#x5143;&#x7D20;&#x9996;&#x6B21;&#x52A0;&#x8F7D;&#x65F6;&#x5E94;&#x5F53;&#x88AB;&#x9009;&#x4E2D;&#x3002;&#xFF08;&#x5355;&#x9009;&#x6846;&#x53EA;&#x5141;&#x8BB8;&#x8BBE;&#x7F6E;&#x5176;&#x4E2D;&#x4E00;&#x4E2A;&#x4E3A;checked  &#xFF09;</td>
</tr>
<tr>
<td>name</td>
<td>&#x5B9A;&#x4E49; input &#x5143;&#x7D20;&#x7684;&#x540D;&#x79F0;&#x3002;&#x9700;&#x8981;&#x4FDD;&#x8BC1;&#x591A;&#x4E2A;&#x5355;&#x9009;&#x9009;&#x9879;&#x7684;&#x540D;&#x5B57;&#x662F;&#x4E00;&#x6837;&#x7684;</td>
</tr>
<tr>
<td>type</td>
<td>&#x89C4;&#x5B9A; input &#x5143;&#x7D20;&#x7684;&#x7C7B;&#x578B;&#x3002;</td>
</tr>
<tr>
<td>value</td>
<td>&#x89C4;&#x5B9A; input &#x5143;&#x7D20;&#x7684;&#x503C;&#x3002;</td>
</tr>
<tr>
<td>maxlenghth</td>
<td>&#x8BE5;&#x6570;&#x636E;&#x7684;&#x503C;&#x6240;&#x5141;&#x8BB8;&#x7684;&#x6700;&#x5927;&#x5B57;&#x7B26;&#x957F;&#x5EA6;</td>
</tr>
<tr>
<td>disabled</td>
<td>&#x5F53; input &#x5143;&#x7D20;&#x52A0;&#x8F7D;&#x65F6;&#x7981;&#x7528;&#x6B64;&#x5143;&#x7D20;&#xFF0C;&#x7981;&#x7528;&#x8F93;&#x5165;&#x548C;&#x7981;&#x6B62;&#x63D0;&#x4EA4;&#x6570;&#x636E;</td>
</tr>
<tr>
<td>readonly</td>
<td>&#x89C4;&#x5B9A;&#x8F93;&#x5165;&#x5B57;&#x6BB5;&#x4E3A;&#x53EA;&#x8BFB;&#xFF0C;&#x7981;&#x6B62;&#x8F93;&#x5165;&#x4F46;&#x5141;&#x8BB8;&#x63D0;&#x4EA4;</td>
</tr>
<tr>
<td>size</td>
<td>&#x5B9A;&#x4E49;&#x8F93;&#x5165;&#x5B57;&#x6BB5;&#x7684;&#x5BBD;&#x5EA6;&#x3002;&#x63A7;&#x5236;&#x8F93;&#x5165;&#x6846;&#x7684;&#x663E;&#x793A;&#x957F;&#x5EA6;</td>
</tr>
<tr>
<td>placeholder</td>
<td>&#x63D0;&#x793A;&#x8BED;&#xFF08;&#x7070;&#x8272;&#x4E0D;&#x9700;&#x8981;&#x5220;&#x9664;&#xFF09;</td>
</tr>
</tbody>
</table>
<h3 id="type&#x5C5E;&#x6027;&#x503C;">type&#x5C5E;&#x6027;&#x503C;</h3>
<table>
<thead>
<tr>
<th>&#x5C5E;&#x6027;&#x503C;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td>button</td>
<td>&#x5B9A;&#x4E49;&#x53EF;&#x70B9;&#x51FB;&#x6309;&#x94AE;&#xFF08;&#x591A;&#x6570;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x7528;&#x4E8E;&#x901A;&#x8FC7; JavaScript &#x542F;&#x52A8;&#x811A;&#x672C;&#xFF09;&#x3002;</td>
</tr>
<tr>
<td>checkbox</td>
<td>&#x5B9A;&#x4E49;&#x590D;&#x9009;&#x6846;&#x3002;</td>
</tr>
<tr>
<td>file</td>
<td>&#x5B9A;&#x4E49;&#x8F93;&#x5165;&#x5B57;&#x6BB5;&#x548C; &quot;&#x6D4F;&#x89C8;&quot;&#x6309;&#x94AE;&#xFF0C;&#x4F9B;&#x6587;&#x4EF6;&#x4E0A;&#x4F20;&#x3002;</td>
</tr>
<tr>
<td>hidden</td>
<td>&#x5B9A;&#x4E49;&#x9690;&#x85CF;&#x7684;&#x8F93;&#x5165;&#x5B57;&#x6BB5;&#x3002;&#x9690;&#x85CF;&#x57DF; &#x4E13;&#x95E8;&#x7528;&#x6765;&#x9690;&#x85CF;&#x4E00;&#x4E9B;&#x4E0D;&#x9700;&#x8981;&#x7528;&#x6237;&#x64CD;&#x4F5C;&#x7684;&#x4FE1;&#x606F;</td>
</tr>
<tr>
<td>image</td>
<td>&#x5B9A;&#x4E49;&#x56FE;&#x50CF;&#x5F62;&#x5F0F;&#x7684;&#x63D0;&#x4EA4;&#x6309;&#x94AE;&#x3002;</td>
</tr>
<tr>
<td>password</td>
<td>&#x5B9A;&#x4E49;&#x5BC6;&#x7801;&#x5B57;&#x6BB5;&#x3002;&#x8BE5;&#x5B57;&#x6BB5;&#x4E2D;&#x7684;&#x5B57;&#x7B26;&#x88AB;&#x63A9;&#x7801;&#x3002;</td>
</tr>
<tr>
<td>radio</td>
<td>&#x5B9A;&#x4E49;&#x5355;&#x9009;&#x6309;&#x94AE;&#x3002;</td>
</tr>
<tr>
<td>reset</td>
<td>&#x5B9A;&#x4E49;&#x91CD;&#x7F6E;&#x6309;&#x94AE;&#x3002;&#x91CD;&#x7F6E;&#x6309;&#x94AE;&#x4F1A;&#x6E05;&#x9664;&#x8868;&#x5355;&#x4E2D;&#x7684;&#x6240;&#x6709;&#x6570;&#x636E;&#x3002;</td>
</tr>
<tr>
<td>submit</td>
<td>&#x5B9A;&#x4E49;&#x63D0;&#x4EA4;&#x6309;&#x94AE;&#x3002;&#x63D0;&#x4EA4;&#x6309;&#x94AE;&#x4F1A;&#x628A;&#x8868;&#x5355;&#x6570;&#x636E;&#x53D1;&#x9001;&#x5230;&#x670D;&#x52A1;&#x5668;&#x3002;</td>
</tr>
<tr>
<td>text</td>
<td>&#x5B9A;&#x4E49;&#x5355;&#x884C;&#x7684;&#x8F93;&#x5165;&#x5B57;&#x6BB5;&#xFF0C;&#x7528;&#x6237;&#x53EF;&#x5728;&#x5176;&#x4E2D;&#x8F93;&#x5165;&#x6587;&#x672C;&#x3002;&#x9ED8;&#x8BA4;&#x5BBD;&#x5EA6;&#x4E3A; 20 &#x4E2A;&#x5B57;&#x7B26;&#x3002;</td>
</tr>
</tbody>
</table>
<h3 id="label&#x5C5E;&#x6027;">label&#x5C5E;&#x6027;</h3>
<table>
<thead>
<tr>
<th>&#x5C5E;&#x6027;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td>for</td>
<td>&#x89C4;&#x5B9A; label &#x7ED1;&#x5B9A;&#x5230;&#x54EA;&#x4E2A;&#x8868;&#x5355;&#x5143;&#x7D20;&#x3002;</td>
</tr>
<tr>
<td>form</td>
<td>&#x89C4;&#x5B9A; label &#x5B57;&#x6BB5;&#x6240;&#x5C5E;&#x7684;&#x4E00;&#x4E2A;&#x6216;&#x591A;&#x4E2A;&#x8868;&#x5355;&#x3002;</td>
</tr>
</tbody>
</table>
<h3 id="&#x6807;&#x7B7E;&#x57FA;&#x672C;&#x4F7F;&#x7528;">&#x6807;&#x7B7E;&#x57FA;&#x672C;&#x4F7F;&#x7528;</h3>
<h4 id="typetextpassword">type=text+password</h4>
<pre><code class="lang-html">&#x7528;&#x6237;&#x540D;&#xFF1A;<span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;text&quot;</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">&quot;dd&quot;</span> <span class="hljs-attribute">maxlength</span>=<span class="hljs-value">&quot;5&quot;</span>
    <span class="hljs-attribute">readonly</span>; /&gt;</span><span class="hljs-tag">&lt;<span class="hljs-title">br</span> /&gt;</span>
&#x5BC6;&#x7801;&#xFF1A;<span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;password&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;pw&quot;</span> <span class="hljs-attribute">placeholder</span>=<span class="hljs-value">&quot;&#x8BF7;&#x8F93;&#x5165;&#x5BC6;&#x7801;&quot;</span>/&gt;</span><span class="hljs-tag">&lt;<span class="hljs-title">br</span> /&gt;</span>
</code></pre>
<h4 id="typehidden">type=hidden</h4>
<pre><code class="lang-html">ip: <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;hidden&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;ip_address&quot;</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">&quot;201.60.15.1&quot;</span> /&gt;</span>
</code></pre>
<h4 id="typecheckbok">type=checkbok</h4>
<pre><code class="lang-html">&#x6218;&#x72FC;2<span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;checkbox&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;movies[]&quot;</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">&quot;1&quot;</span>/&gt;</span>|
&#x6740;&#x7834;&#x72FC;<span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;checkbox&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;movie[]&quot;</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">&quot;2&quot;</span>/&gt;</span>|
&#x4F60;&#x7684;&#x540D;&#x5B57;<span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;checkbox&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;movie[]&quot;</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">&quot;3&quot;</span>/&gt;</span>|
&#x6B63;&#x4E49;&#x8054;&#x76DF;<span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;checkbox&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;movie[]&quot;</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">&quot;4&quot;</span>/&gt;</span>|
</code></pre>
<h3 id="labeltyperadio">label+type=radio</h3>
<pre><code class="lang-html">&#x6027;&#x522B;&#xFF1A;
<span class="hljs-tag">&lt;<span class="hljs-title">label</span> <span class="hljs-attribute">for</span>=<span class="hljs-value">&quot;man&quot;</span>&gt;</span>&#x7537;<span class="hljs-tag">&lt;/<span class="hljs-title">label</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;radio&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;sex&quot;</span> <span class="hljs-attribute">id</span>=<span class="hljs-value">&quot;man&quot;</span>&gt;</span> /
<span class="hljs-tag">&lt;<span class="hljs-title">label</span> <span class="hljs-attribute">for</span>=<span class="hljs-value">&quot;lady&quot;</span>&gt;</span>&#x5973;<span class="hljs-tag">&lt;/<span class="hljs-title">label</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;radio&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;sex&quot;</span> <span class="hljs-attribute">id</span>=<span class="hljs-value">&quot;lady&quot;</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-title">br</span> /&gt;</span>
</code></pre>
<h4 id="imagesubmitreset">image+submit+reset</h4>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;image&quot;</span> <span class="hljs-attribute">src</span>=<span class="hljs-value">&quot;img/QQ&#x56FE;&#x7247;20171208173444.jpg&quot;</span> <span class="hljs-attribute">style</span>=<span class="hljs-value">&quot;width: 100px; vertical-align: middle;&quot;</span> /&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;reset&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;&quot;</span> <span class="hljs-attribute">id</span>=<span class="hljs-value">&quot;&quot;</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">&quot;&#x91CD;&#x7F6E;&quot;</span> /&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">type</span>=<span class="hljs-value">&quot;submit&quot;</span> <span class="hljs-attribute">name</span>=<span class="hljs-value">&quot;&quot;</span> <span class="hljs-attribute">id</span>=<span class="hljs-value">&quot;&quot;</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">&quot;&#x63D0;&#x4EA4;&quot;</span> /&gt;</span>
</code></pre>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../html/base&amp;icon.html" class="navigation navigation-prev " aria-label="Previous page: base&amp;link基本使用"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../html/form.html" class="navigation navigation-next " aria-label="Next page: from标签基本使用"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sectionx/sectionx.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"sectionx":{},"expandable-chapters":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
